let str = "string";

//字符串新增方法：
var boolean = str.includes('str')
console.log(boolean) ;

var boolean = str.endsWith('str')
console.log(boolean);

boolean = str.startsWith('str');
console.log(boolean);

var repStr = str.repeat(2);
console.log(repStr);

//补全方法：补全字符串长度